<% form_remote_tag :url =>{:action => :add_users,:id =>@project.id},
 :before => "Element.show('spinner3');",:complete => "Element.hide('spinner3');" do %>
<table summary="EE List" id="user_index_table2">
  <caption>
    
  </caption>
  <thead>
    <tr>
      <th scope="col">check</th>
      <th scope="col">Points</th>
      <th scope="col">id</th>
      <th scope="col">Cn Name</th>
      <th scope="col">English Name</th>
      <th scope="col">Ext</th>
      <th scope="col">Department</th>
      
    </tr>
  </thead>
  <% unless @users.empty? %>
			
			    <% for user in @users %>
			      <tr>
			        <td>
			          <% unless @project.users.include?(user) %>    
          					<%= check_box_tag "user_ids[]", user.id %>
			            <%#= link_to_remote( image_tag("/images/bullet_plus.png",:border => 0,:alt =>"select this person",:id =>"img_#{user.id}"),
			              :url =>{:action => :add_users,:id => @project.id,:user_id =>user.id ,:point => @project.per_point},:method =>:get) %>
			          <% end %>
			        </td>
			        <td><%#= text_field_tag "point",@project.per_point,:id=>"point_#{user.id}"  %><%= @project.per_point %></td>
			        <td><%= user.employee_id %></td>
  <td style="text-align:left;padding-left: 15px;">						<%= image_tag("/images/male.gif",:title =>"male",:alt =>"male",:style => "text-align:left;padding-right: 15px;") if user.gender.downcase == 'male' %>
						<%= image_tag("/images/female.gif",:title =>"female",:alt =>"female",:style => "text-align:left;padding-right: 15px;") if user.gender.downcase == 'female' %>
					<%= link_to user.chinese_name,user_path(user) %></td>
			        <td><%= user.english_name %></td>
			        <td><%= user.ext %></td>
			        <td><%= user.department.name %></td>
    
			      </tr>
			    <% end %>
			
			
  <% else %>
    <tr><td colspan="7">No this user.</td></tr>
  <% end %>
</table>
<p/>

 <input type="button" value="- 全 选-" onclick=selcheck();>
 <%= submit_tag '- 添 加-', :disable_with => "Saving..." %>
	<img style="display: none;" src="/images/spinner.gif" id="spinner3"/>
<% end %>
<br/>


